1. Field of the Invention
The present invention relates to a printer apparatus that is linked to an external host unit via a predetermined interface and that prints data received from the host unit on cut-sheet paper, a control method and control program used for the printer apparatus, and a computer-readable storage medium containing the control program.
2. Description of the Related Art
Conventionally, if a cable for the interface with the host unit is disconnected, in other words, the interface link is broken while the above printer apparatus (hereinafter also referred to simply as the “printer”) is printing the print data, the printer cannot detect and notify the situation to the user of the printer. In this situation, the printer cannot receive the print data (including control commands) during a printing process, and the printer performs the printing of print data remaining in a receiving buffer that temporarily stores the received print data. In many cases, in the remaining print data, print data for the last page is not completely printed, and the printer does not receive a paper-discharge command to discharge the last page. Accordingly, in many cases, disconnection of the interface cable during the printing process causes the printer to terminate printing without discharging the sheet of paper on which the print data for the last page is printed.
To solve this defect, conventional types of printers are designed so that, when the printer detects a sheet of paper remaining on a paper-feeding path in the printer, it starts printing after initially discharging the remaining sheet. However, depending on the arrangement of a paper-feeding path and paper sensors, it is impossible for a particular type of printer to distinguish between a state in which a sheet of paper remains on the paper-feeding path and a state in which a sheet of paper is inserted in a manual feeder unit. Thus, these particular types of printers are not designed not to perform the initial discharging of paper when paper is manually fed for printing.
As for the conventional printer, a type of construction is known in which a plurality of interfaces are used to link the printer to a plurality of host units, and print data from the host units can be printed by a single printing mechanism by switching the interfaces to select one interface.
In the above-described construction, if a cable for the interface is disconnected, while printing print data received from one host unit via one interface, the printing is interrupted as described above, and the sheet of paper on which a portion of the remaining print data for the last page is printed is not discharged. In this state, in a case in which print data is received from another host unit via another interface and is printed, if a normal paper-feeding mode is activated in which paper is fed from a paper-feeding cassette, the automatic discharge of the remaining sheet of paper is initially performed, and the printer can perform printing without any trouble.
Nevertheless, when print data from another host unit is printed while paper is fed manually by the user, initial discharge of the remaining sheet may not be performed depending on the type of printer. In this case, the remaining sheet for the last page must be discharged by operating the operation panel of the printer in advance. Otherwise, the user must extract the remaining sheet in the case of a printer that cannot be instructed to discharge the paper by operating the operation panel of the printer.
If the user starts printing in which paper is fed manually by the user without being aware of the remaining sheet for the last page, the printing is started from a portion other than the beginning of the remaining sheet, and results in a failure.